package biteHomework._11_03;
@SuppressWarnings("all")
public class H_02 {
    public static void main(String[] args) {
        Student student = new Student("zhangsan",18);
        System.out.println(Student.getClassroom());
        Student.setClassroom("1班");
        System.out.println(student.getClassroom());
    }
}
class Student{
    private String name;
    private int age;
    private static String classroom;
    static {
        System.out.println("静态代码块被执行");
    }

    {
        System.out.println("构造代码块被执行");
    }

    public Student(String name, int age) {
        System.out.println("构造方法执行");
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static String getClassroom() {
        return classroom;
    }

    public static void setClassroom(String classroom) {
        Student.classroom = classroom;
    }
}